import url from '@/tool/index.js'
export const weChatPay = (ordernumber) => { //微信支付
	return new Promise(resolve => {
		uni.request({
			url: url+'/api/yuyue/wxpay',
			data: {
				token:uni.getStorageSync('userToken'),
				ordernumber:ordernumber
			},
			method: 'POST',
			header:{
				'Content-Type':'application/x-www-form-urlencoded'
			},
			success: (res) => resolve(res.data),
		});
	})
}

export const testWeChatPay = (ordernumber) => { //微信支付
	return new Promise(resolve => {
		uni.request({
			url: url+'/api/practice/wxpay',
			data: {
				token:uni.getStorageSync('userToken'),
				ordernumber:ordernumber
			},
			method: 'POST',
			header:{
				'Content-Type':'application/x-www-form-urlencoded'
			},
			success: (res) => resolve(res.data),
		});
	})
}